package com.chixing.day17_reflect_thread;

public class AccountTest {
    public static void main(String[] args) {
        Account account = new Account("smith",0);

        for (int i = 0;i<1000;i++){
            AccountThread thread = new AccountThread(account);
            thread.start();
        }
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("主线程休眠足够久的时间，保证1000个终端存款完成后，再获得余额" + account.getAccBalance());

    }
}
